package com.example.jee_springboot.config;

import com.example.jee_springboot.entity.Stu;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
@Configuration
public class ProfileBean {
    @Profile("dev")
    @Bean("stu-profile")
    public Stu stu1(){
        Stu stu=new Stu();
        stu.setUsername("dev stu");
        return stu;
    }
    @Profile("prod")
    @Bean("stu-profile")
    public Stu stu2(){
        Stu stu=new Stu();
        stu.setUsername("prod stu");
        return stu;
    }
}
